/**
 * 
 */
package de.cbf.cam.dsa.model.entities.weapon.valueModifier;

import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import de.cbf.cam.dsa.model.entities.weapon.OneWeapon;

/**
 * @author Nebelritter
 *
 */
@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class WeaponTPModifier extends WeaponValueModifier {
	/**
	 * @uml.property  name="tpDiceNumberMod"
	 */
	private int tpDiceNumberMod;
	/**
	 * @uml.property  name="tpDiceSidesMod"
	 */
	private int tpDiceSidesMod;
	/**
	 * @uml.property  name="tpBonusMod"
	 */
	private int tpBonusMod;
	
	public WeaponTPModifier(int type, int tpDiceNumberMod, int tpDiceSidesMod,int tpBonusMod) {
		super(type);
		this.tpDiceNumberMod = tpDiceNumberMod;
		this.tpDiceSidesMod = tpDiceSidesMod;
		this.tpBonusMod = tpBonusMod;
	}
	/* (non-Javadoc)
	 * @see de.cbf.cam.dsa.model.entities.weapon.valueModifier.WeaponValueModifier#modifyWeaponValue(de.cbf.cam.dsa.model.entities.weapon.OneWeapon)
	 */
	@Override
	public void modifyWeaponValue(OneWeapon weapon) {
		weapon.setTpDiceNumber(weapon.getTpDiceNumber()+tpDiceNumberMod);
		weapon.setTpDiceSides(weapon.getTpDiceSides()+tpDiceSidesMod);
		weapon.setTpBonus(weapon.getTpBonus()+tpBonusMod);
	}
	@Override
	public void unModifyWeaponValue(OneWeapon weapon) {
		weapon.setTpDiceNumber(weapon.getTpDiceNumber()+tpDiceNumberMod);
		weapon.setTpDiceSides(weapon.getTpDiceSides()+tpDiceSidesMod);
		weapon.setTpBonus(weapon.getTpBonus()+tpBonusMod);		
	}
	/**
	 * @return
	 * @uml.property  name="tpDiceNumberMod"
	 */
	public int getTpDiceNumberMod() {
		return tpDiceNumberMod;
	}
	/**
	 * @param tpDiceNumberMod
	 * @uml.property  name="tpDiceNumberMod"
	 */
	public void setTpDiceNumberMod(int tpDiceNumberMod) {
		this.tpDiceNumberMod = tpDiceNumberMod;
	}
	/**
	 * @return
	 * @uml.property  name="tpDiceSidesMod"
	 */
	public int getTpDiceSidesMod() {
		return tpDiceSidesMod;
	}
	/**
	 * @param tpDiceSidesMod
	 * @uml.property  name="tpDiceSidesMod"
	 */
	public void setTpDiceSidesMod(int tpDiceSidesMod) {
		this.tpDiceSidesMod = tpDiceSidesMod;
	}
	/**
	 * @return
	 * @uml.property  name="tpBonusMod"
	 */
	public int getTpBonusMod() {
		return tpBonusMod;
	}
	/**
	 * @param tpBonusMod
	 * @uml.property  name="tpBonusMod"
	 */
	public void setTpBonusMod(int tpBonusMod) {
		this.tpBonusMod = tpBonusMod;
	}
}
